﻿@page "/pdf-viewer/handwritten-signature"

@using Syncfusion.Blazor.PdfViewerServer
@using Syncfusion.Blazor.PdfViewer

@inherits SampleBaseComponent;

<SampleDescription>
    <p>This sample demonstrates the Handwritten signature support of PDF Viewer. The Handwritten signature reduces the paperwork of reviewing the contents and it’s verified it’s digitally.</p>
</SampleDescription>
<ActionDescription>
    <p>In the PDF Viewer component, we can explicitly open the Handwritten signature dialog using the method setAnnotationMode.</p>
    <p>More information about the PDF Viewer can be found on this<a target='_blank' href='https://blazor.syncfusion.com/documentation/pdfviewer/getting-started/server-side-application/'> documentation section</a>.</p>
</ActionDescription>

<div class="control-section">
    <SfPdfViewerServer @ref="viewer" DocumentPath="@DocumentPath" Height="640px" Width="100%">
        <PdfViewerEvents DocumentLoaded="DocumentLoad"></PdfViewerEvents>
    </SfPdfViewerServer>
</div>

@code {
    SfPdfViewerServer viewer;
    public void DocumentLoad(LoadEventArgs args)
    {
        viewer.SetAnnotationMode(AnnotationType.HandWrittenSignature);
    }
    private string DocumentPath { get; set; } = "wwwroot/data/pdfviewer/hand-written-signature.pdf";
}